import { IsNotEmpty, MaxLength, MinLength } from 'class-validator';

export class UpdateAuthDto {
  @IsNotEmpty({ message: '旧密码不能为空' })
  oldPassword: string;

  @IsNotEmpty({ message: '新密码不能为空' })
  @MinLength(8, { message: '密码长度不能小于8位' })
  @MaxLength(20, { message: '密码长度不能大于20位' })
  newPassword: string;

  @IsNotEmpty({ message: '确认密码不能为空' })
  @MinLength(8, { message: '密码长度不能小于8位' })
  @MaxLength(20, { message: '密码长度不能大于20位' })
  confirmPassword: string;
}
